﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Web;
using System.Collections.ObjectModel;
using Medianamik.Globalization;

namespace Medianamik.Core.Synchronization
{
    [DebuggerDisplay("{Name} : {Id}")]
    [CLSCompliant(false)]
    public class RecordType : SynchronizedHierarchicalEntity
    {
        public string Description { get; set; }
        public string ExtendedProperties { get; set; }
        public bool IsIndexable { get; set; }
        public bool IsListable { get; set; }
        public bool IsSystem { get; set; }
        public bool IsAbstract { get; set; }
        public bool IsGenerated { get; set; }
        public bool IsInheritable { get; set; }
        public bool IsVersioned { get; set; }
        public bool IsManyToMany { get; set; }
        public Translation LocalizedNames { get; set; }

        public IList<Guid> LegitimateParentRecordTypeIds
        {
            get { return _legitimateParentRecordTypeIds; }
            set { _legitimateParentRecordTypeIds = value; }
        }
        IList<Guid> _legitimateParentRecordTypeIds = new List<Guid>();

        public IList<Guid> LegitimateParentRecordIds
        {
            get { return _legitimateParentRecordIds; }
            set { _legitimateParentRecordIds = value; }
        }
        IList<Guid> _legitimateParentRecordIds = new List<Guid>();

        public IList<RecordTypeProperty> Properties
        {
            get { return _properties; }
            set { _properties = value; }
        }
        IList<RecordTypeProperty> _properties = new List<RecordTypeProperty>();

        public IList<RecordTypeTemplate> Templates
        {
            get { return _templates; }
            set { _templates = value; }
        }
        IList<RecordTypeTemplate> _templates = new List<RecordTypeTemplate>();

        //Permet-on d'importer la sécurité ?
        //Permissions

        //Que fait-on pour les ExtendedProperties ?
        //Qu'est-ce qui reste la-dedans ?
    }
}
